package com.xiaoyy.app.api.core.dao.model;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.FieldFill;
import java.sql.Blob;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 * 公告表
 * </p>
 *
 * @author chenzh
 * @since 2020-07-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("APP_NOTICE")
@ApiModel(value="AppNotice对象", description="公告表")
public class AppNotice extends Model<AppNotice> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公告id")
    @TableId(value = "NOTICE_ID", type = IdType.INPUT)
    private Long noticeId;

    @ApiModelProperty(value = "公告标题")
    @TableField("TITLE")
    private String title;

    @ApiModelProperty(value = "公告内容")
    @TableField("NOTICE_CONTENT")
    private Blob noticeContent;

    @ApiModelProperty(value = "公告文件url")
    @TableField("URL")
    private String url;

    @ApiModelProperty(value = "公共文件类型 image 图片 pdf")
    @TableField("FILE_TYPE")
    private String fileType;

    @ApiModelProperty(value = "内容类型：file 文件 text 文本")
    @TableField("CONTENT_TYPE")
    private String contentType;

    @ApiModelProperty(value = "是否根据标签显示 0 否 1 是")
    @TableField("LABEL_FLAG")
    private String labelFlag;

    @ApiModelProperty(value = "链接地址")
    @TableField("LINK_URL")
    private String linkUrl;

    @ApiModelProperty(value = "链接类型：router 内部路由 h5 第三方H5 weixin 第三方微信小程序")
    @TableField("LINK_TYPE")
    private String linkType;

    @ApiModelProperty(value = "内部路由路径")
    @TableField("LINK_PATH")
    private String linkPath;

    @ApiModelProperty(value = "内部路由名")
    @TableField("LINK_NAME")
    private String linkName;

    @ApiModelProperty(value = "链接参数：json")
    @TableField("LINK_PARAMS")
    private String linkParams;

    @ApiModelProperty(value = "描述")
    @TableField("REMARKS")
    private String remarks;

    @ApiModelProperty(value = "发布时间")
    @TableField("PUBLISH_TIME")
    private Date publishTime;

    @ApiModelProperty(value = "下架时间")
    @TableField("OFF_TIME")
    private Date offTime;

    @ApiModelProperty(value = "发布主体（人或单位）")
    @TableField("PUBLISHER")
    private String publisher;

    @ApiModelProperty(value = "状态 draft 草稿 auth 审核中 finish 准备完成 on 发布中 off 下架")
    @TableField("STATUS")
    private String status;

    @ApiModelProperty(value = "审核状态 0 未审核 1 审核通过 2 审核不通过")
    @TableField("AUTH_STATUS")
    private String authStatus;

    @ApiModelProperty(value = "审核说明")
    @TableField("AUTH_REMARKS")
    private String authRemarks;

    @ApiModelProperty(value = "审核人")
    @TableField("AUTH_USER_ID")
    private String authUserId;

    @ApiModelProperty(value = "审核时间")
    @TableField("AUTH_TIME")
    private Date authTime;

    @ApiModelProperty(value = "创建人")
    @TableField("CREATE_NAME")
    private String createName;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "CREATE_TIME", fill = FieldFill.INSERT)
    private Date createTime;

    @ApiModelProperty(value = "修改人")
    @TableField("UPDATE_NAME")
    private String updateName;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "UPDATE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "逻辑删除标志 0 正常 1 删除")
    @TableField("DEL")
    private String del;


    @Override
    protected Serializable pkVal() {
        return this.noticeId;
    }

}
